package tech.heptagram.staff.api.v3;

import java.util.List;

import tech.heptagram.core.common.rest.ResponseResult;
import tech.heptagram.staff.model.Department;
import tech.heptagram.staff.query.DepartmentQuery;
import tech.heptagram.staff.query.DepartmentRemoveReq;
import tech.heptagram.staff.query.DepartmentReq;

/**
 * 员工部门API
 *
 * @author wang.yuchuan
 * @date 2018/9/10
 */
public interface DepartmentApi {

    ResponseResult<Department> getById(Integer id);

    ResponseResult<List<Department>> getByParentId(Integer parentId);

    ResponseResult<List<Department>> findByQuery(DepartmentQuery departmentQuery);

    ResponseResult<List<Department>> findByStaffCode(String staffCode);

    ResponseResult<Department> findByDingDepartmentId(Long dingDepartmentId);

    /**
     * 保存新部门
     */
    ResponseResult<Integer> save(DepartmentReq departmentReq);

    /**
     * 修改部门信息
     */
    ResponseResult modify(DepartmentReq departmentReq);

    /**
     * 删除部门信息
     */
    ResponseResult delete(DepartmentRemoveReq departmentReq);
}
